package engine;

import org.andes.kownledge.Problem;
import org.andes.kownledge.ProblemManager;
import org.andes.kownledge.operator.Operator;
import org.armedbear.lisp.Interpreter;
import org.armedbear.lisp.Lisp;
import org.armedbear.lisp.LispObject;
import org.armedbear.lisp.Load;
import org.armedbear.lisp.Pathname;

public class LispEngine {
	public static void init(){
		Pathname pathname = new Pathname("kinematics-problems.cl");
		LispObject lo=Load.loadOnly(pathname, false, false, true);
		//Interpreter interpreter = Interpreter.createInstance();
		//interpreter.evaluate("(load \"kinematics-problems.cl\")");
		//LispObject lo=interpreter.readFromString("(load \"kinematics-problems.cl\")");
		System.out.println(lo.toString());
		//interpreter.eval("(load \"kinematics-problems.cl\")"); 
		
		try {
			ProblemManager.readProblem();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	
	
	
	
	public static void main(String[] args) {
		try {
			LispObject o=Interpreter.readFromString("(+ 2 3)");
			
			LispObject result=Lisp.eval(o);
			System.out.println(result.toString());
			//Interpreter.evaluate("(+ 2 3)");
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		

	}
}
